<!DOCTYPE html>
<html>
<head>
<base href="${basePath}">
<meta charset="UTF-8">
<head>
<title>修改组</title> $!{include("import_js_css.html")}
<link rel="stylesheet" type="text/css"
	href="/yueyoga_all2014/app/admin/resources/css/basic.css" />
</head>
<body>
	<!-- #set(Group group) -->
	$!{include("header.html")}
	<div class="menu_all">
		<div class="div_search_result clear">
			<div class="panel-heading" style="background: #E9E9E9;">
				<h3 class="panel-title">修改组</h3>
			</div>
			<div class="panel-form-add">
				<form class="form-horizontal" action="yueyogaAdmin/updateGroupUser.jhtml" method="POST">
					<div class="panel-form-layout">
						<label for="txtUserEnName" class="col-sm-1 control-label">英文名字</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" name="userEnName"
								id="txtUserEnName" value="${group.name}" >
							<input type="hidden" value="${group.id}" name="groupId" />
						</div>
						<label for="txtUserChName" class="col-sm-1 control-label">中文名字</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" name="userChName"
								id="txtUserChName" value="${group.namecn}">
						</div>
						<br /> <br />
						
						<label for="enabled" class="col-sm-1 control-label">状态</label>
								<div class="col-sm-3">
									<select class="selectpicker" data-width="100%" id="enabled" name="enabled">
										<option value="1">启用</option>
										<option value="0">禁用</option>
									</select>
								</div>
						<br /> <br />
						
						<label for="txtUserdescription"
							class="col-sm-1 control-label">描述</label>
						<div class="col-sm-3">
							<textarea class="form-control panel-form-address" style="width: 855px;" name="description" id="txtUserdescription" >${group.description}</textarea>
						</div>
						<br /> <br /><br /> <br />
						<div class="panel-btn-search">
							<button type="submit" class="btn btn-default btn-ade-default panel-mr">保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	
	<script type="text/javascript">
		function documentReady() {
			var msg = "${msg}";
			if (msg == "success") {
				var d = alert("修改成功");
				setTimeout(function() {
					d.close().remove();
					window.location.href = "yueyogaAdmin/searchGroupUsers.jhtml";
				}, 1000);
			} else if (msg == "failure") {
				error("修改失败");
			}
			
			$("#enabled").select2({
				width: "100%",
				minimumResultsForSearch: -1
			});
		}
		$(function() {
			$("#enabled").val('${group.enabled=='true'?'1':'0'}');
			$("#selTaskType").change(function() {
				var taskType = $(this).val();
				if (taskType == 2) {
					$("#ta_mbr_div").hide();
					$("#ta_gps_div").show();
				} else {
					$("#ta_gps_div").hide();
					$("#ta_mbr_div").show();
				}
			});
			//--
			$(".form_datetime").datetimepicker({
				minView : "month",
				language : "zh-CN",
				format : "yyyy-mm-dd",
				showMeridian : true,
				autoclose : true,
				todayBtn : true,
				pickerPosition : "bottom-left"
			});
		});
	</script>
</body>
</html>
